/**   
* @Title: ManagerImpl.java 
* @Package cn.hdmis.dao.imp 
* @Description: TODO
* @author pnwazgx@163.com   
* @date 2011-3-27 上午12:48:47 
* @version V1.0   
*/
package cn.hdmis.dao.impl;

import cn.hdmis.dao.ManagerDao;
import cn.hdmis.entity.Manager;

/** 
 * @ClassName: ManagerImpl 
 * @Description: TODO
 * @author pnwzgx@163.com
 * @date 2011-3-27 上午12:48:47 
 *  
 */

public class ManagerDaoImpl extends BaseDaoImp<Manager> implements ManagerDao {

	/* (非 Javadoc) 
	 * <p>Title: addManager</p> 
	 * <p>Description: </p> 
	 * @param manager 
	 * @see cn.hdmis.dao.ManagerDao#addManager(cn.hdmis.entity.Manager) 
	 */
	@Override
	public void addManager(Manager manager) {
		// TODO Auto-generated method stub
		super.save(manager);

	}

	/* (非 Javadoc) 
	 * <p>Title: del</p> 
	 * <p>Description: </p> 
	 * @param manager 
	 * @see cn.hdmis.dao.ManagerDao#del(cn.hdmis.entity.Manager) 
	 */
	@Override
	public void del(Manager manager) {
		// TODO Auto-generated method stub
		Manager mg = this.findByID(manager.getId());
		mg.setStatus(new Integer(0));
		super.update(mg);
	}
	/* (非 Javadoc) 
	 * <p>Title: removeManager</p> 
	 * <p>Description: </p> 
	 * @param manager 
	 * @see cn.hdmis.dao.ManagerDao#removeManager(cn.hdmis.entity.Manager) 
	 */
	@Override
	public void removeManager(Manager manager) {
		// TODO Auto-generated method stub
		this.del(manager);
	}

	/* (非 Javadoc) 
	* <p>Title: enableManager</p> 
	* <p>Description: </p> 
	* @param manager 
	* @see cn.hdmis.dao.ManagerDao#enableManager(cn.hdmis.entity.Manager) 
	*/
	@Override
	public void enableManager(Manager manager) {
		// TODO Auto-generated method stub
		Manager mg = this.findByID(manager.getId());
		mg.setStatus(new Integer(1));
		super.update(mg);
	}

}
